go/types.object.typ (field)
162 uses
go/types (current package)
alias.go#L150: if obj.typ == nil {
alias.go#L151: obj.typ = a
assignments.go#L122: if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) {
assignments.go#L123: if lhs.typ == nil {
assignments.go#L124: lhs.typ = Typ[Invalid]
assignments.go#L132: if lhs.typ == nil {
assignments.go#L133: lhs.typ = Typ[Invalid]
assignments.go#L140: if lhs.typ == nil {
assignments.go#L141: lhs.typ = x.typ
assignments.go#L144: check.assignment(x, lhs.typ, "constant declaration")
assignments.go#L157: if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) {
assignments.go#L158: if lhs.typ == nil {
assignments.go#L159: lhs.typ = Typ[Invalid]
assignments.go#L166: if lhs.typ == nil {
assignments.go#L172: lhs.typ = Typ[Invalid]
assignments.go#L178: lhs.typ = typ
assignments.go#L181: check.assignment(x, lhs.typ, context)
assignments.go#L292: res = append(res, x.typ)
assignments.go#L412: check.expr(newTarget(lhs.typ, desc), &x, orig_rhs[i])
assignments.go#L432: if v.typ == nil {
assignments.go#L433: v.typ = Typ[Invalid]
assignments.go#L464: if v.typ == nil {
assignments.go#L465: v.typ = Typ[Invalid]
builtins.go#L1019: if hasVarSize(f.typ, seen) {
call.go#L324: x.typ = sig.results.vars[0].typ // unpack tuple
call.go#L414: resList[i] = &operand{mode: value, expr: e, typ: v.typ}
call.go#L498: typ := last.typ.(*Slice).elem
call.go#L656: check.assignment(a, sigParams.vars[i].typ, context)
call.go#L749: x.typ = exp.typ
call.go#L753: x.typ = exp.typ
call.go#L756: x.typ = exp.typ
call.go#L762: x.typ = exp.typ
call.go#L765: x.typ = x.typ.(*Signature).results.vars[0].typ
call.go#L769: x.typ = exp.typ
call.go#L784: if def != nil && def.typ == x.typ {
call.go#L863: sig := m.typ.(*Signature)
call.go#L910: x.typ = obj.typ
call.go#L965: sig := *obj.typ.(*Signature)
check.go#L233: alias.typ = Typ[Invalid]
check.go#L240: alias.typ = typ
decl.go#L139: if !check.validCycle(obj) || obj.typ == nil {
decl.go#L140: obj.typ = Typ[Invalid]
decl.go#L144: if !check.validCycle(obj) || obj.typ == nil {
decl.go#L145: obj.typ = Typ[Invalid]
decl.go#L155: obj.typ = Typ[Invalid]
decl.go#L241: if check.inTParamList && isGeneric(obj.typ) {
decl.go#L444: assert(obj.typ == nil)
decl.go#L466: obj.typ = Typ[Invalid]
decl.go#L469: obj.typ = t
decl.go#L490: assert(obj.typ == nil)
decl.go#L494: obj.typ = check.varType(typ)
decl.go#L509: obj.typ = Typ[Invalid]
decl.go#L517: check.expr(newTarget(obj.typ, obj.name), &x, init)
decl.go#L535: lhs.typ = obj.typ
decl.go#L553: assert(obj.typ == nil)
decl.go#L560: if t := asNamed(obj.typ); t != nil { // type may be invalid
decl.go#L775: base := asNamed(obj.typ) // shouldn't fail but be conservative
decl.go#L846: assert(obj.typ == nil)
decl.go#L852: obj.typ = sig // guard against cycles
decl.go#L952: assert(obj.typ != nil)
expr.go#L1278: list[i] = &operand{mode: value, expr: e, typ: v.typ}
gcsizes.go#L44: if a := s.Alignof(f.typ); a > max {
gcsizes.go#L89: a := s.Alignof(f.typ)
gcsizes.go#L92: if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
gcsizes.go#L143: size := s.Sizeof(t.fields[n-1].typ)
infer.go#L176: if isParameterized(tparams, par.typ) || isParameterized(tparams, arg.typ) {
infer.go#L180: if !u.unify(par.typ, arg.typ, assign) {
infer.go#L181: errorf(par.typ, arg.typ, arg)
infer.go#L184: } else if _, ok := par.typ.(*TypeParam); ok && !arg.isNil() {
infer.go#L335: tpar := params.At(index).typ.(*TypeParam) // is type parameter (no alias) by construction of untyped
infer.go#L611: if w.isParameterized(m.typ) {
infer.go#L644: if w.isParameterized(v.typ) {
infer.go#L765: w.typ(m.typ)
infer.go#L795: w.typ(v.typ)
interface.go#L61: if sig := m.typ.(*Signature); sig.recv == nil {
interface.go#L203: if named := asNamed(def.typ); named != nil {
literals.go#L195: etyp := fld.typ
literals.go#L222: etyp := fld.typ
lookup.go#L213: assert(f.typ != nil)
lookup.go#L232: typ, isPtr := deref(f.typ)
lookup.go#L243: assert(m.typ != nil)
lookup.go#L412: if !equivalent(f.typ, m.typ) {
lookup.go#L456: if !equivalent(f.typ, m.typ) {
lookup.go#L546: if f.embedded && (!isValid(f.typ) || hasInvalidEmbeddedFields(f.typ, seen)) {
lookup.go#L579: w.signature(f.typ.(*Signature))
methodset.go#L149: typ, isPtr := deref(f.typ)
named.go#L245: if obj.typ == nil {
named.go#L246: obj.typ = typ
named.go#L276: obj.typ = typ
named.go#L406: origSig := origm.typ.(*Signature)
object.go#L106: typ Type
object.go#L158: func (obj *object) Type() Type { return obj.typ }
object.go#L174: func (obj *object) setType(typ Type) { obj.typ = typ }
object.go#L307: switch t := obj.typ.(type) {
object.go#L462: if obj.typ != nil {
object.go#L463: return obj.typ.(*Signature) // normal case
object.go#L487: func (obj *Func) Scope() *Scope { return obj.typ.(*Signature).scope }
object.go#L515: if sig, _ := obj.typ.(*Signature); sig != nil && sig.recv != nil {
object.go#L516: _, isPtr := deref(sig.recv.typ)
object.go#L539: return &Label{object{pos: pos, pkg: pkg, name: name, typ: Typ[Invalid], color_: black}, false}
object.go#L550: return &Builtin{object{name: predeclaredFuncs[id].name, typ: Typ[Invalid], color_: black}, id}
object.go#L695: if f.typ != nil {
object.go#L696: sig := f.typ.(*Signature)
predicates.go#L181: if comparableType(f.typ, dynamic, seen) != nil {
predicates.go#L182: return typeErrorf("struct containing %s cannot be compared", f.typ)
predicates.go#L300: !c.identical(f.typ, g.typ, p) {
predicates.go#L322: if !c.identical(v.typ, w.typ, p) {
predicates.go#L448: if f.Id() != g.Id() || !c.identical(f.typ, g.typ, q) {
range.go#L124: assert(obj.typ == nil)
range.go#L130: obj.typ = Typ[Invalid]
range.go#L145: assert(obj.typ != nil)
resolver.go#L637: if obj, _ := obj.(*TypeName); obj != nil && obj.typ != nil {
selection.go#L100: sig := *s.obj.(*Func).typ.(*Signature)
selection.go#L102: recv.typ = s.recv
selection.go#L111: sig := *s.obj.(*Func).typ.(*Signature)
selection.go#L114: arg0.typ = s.recv
signature.go#L63: last := params.At(n - 1).typ
signature.go#L430: last.typ = &Slice{elem: last.typ}
signature.go#L431: check.recordTypeAndValue(list.List[len(list.List)-1].Type, typexpr, last.typ, nil)
signature.go#L450: rtyp, _ := deref(recv.typ)
signature.go#L484: check.errorf(pos, InvalidRecv, "invalid receiver type %s", recv.typ)
sizes.go#L82: if a := s.Alignof(f.typ); a > max {
sizes.go#L139: a := s.Alignof(f.typ)
sizes.go#L142: if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
sizes.go#L216: size := s.Sizeof(t.fields[n-1].typ)
sizes.go#L322: T = s.fields[i].typ
subst.go#L291: if typ := subst.typ(v.typ); typ != v.typ {
subst.go#L300: copy.typ = typ
subst.go#L334: if typ := subst.typ(f.typ); typ != f.typ {
subst.go#L343: copy.typ = typ
typeparam.go#L52: if obj.typ == nil {
typeparam.go#L53: obj.typ = typ
typeset.go#L243: if pos.IsValid() && !check.allowVersion(go1_14) || !Identical(m.typ, other.Type()) {
typestring.go#L171: w.typ(f.typ)
typestring.go#L250: w.signature(m.typ.(*Signature))
typestring.go#L350: w.typ(Unalias(t.obj.typ))
typestring.go#L370: w.signature(m.typ.(*Signature))
typestring.go#L453: typ := v.typ
typestring.go#L499: w.typ(sig.results.vars[0].typ)
typexpr.go#L418: switch t := def.typ.(type) {
unify.go#L522: if ym := ymap[xm.Id()]; ym == nil || !u.nify(xm.typ, ym.typ, exact, p) {
unify.go#L543: if ym, _ := obj.(*Func); ym == nil || !u.nify(xm.typ, ym.typ, exact, p) {
unify.go#L616: !u.nify(f.typ, g.typ, emode, p) {
unify.go#L638: if !u.nify(v.typ, w.typ, mode, p) {
unify.go#L713: if f.Id() != g.Id() || !u.nify(f.typ, g.typ, exact, q) {
universe.go#L169: def(&Nil{object{name: "nil", typ: Typ[UntypedNil], color_: black}})
validtype.go#L57: if !check.validType0(pos, f.typ, nest, path) {